package leetcodecompetition.D379;

/**
 * @Author: Siantar
 * @Date: 2024-01-07-10:41
 * @Description: 1.0
 */
public class T100187 {
    public int minMovesToCaptureTheQueen(int a, int b, int c, int d, int e, int f) {
        if (a == c && c == e && (b > d && d > f || b < d && d < f)) return 2;
        if (b == d && d == f && (a > c && c > e || a < c && c < e)) return 2;
        if (c - e == d - f && a - c == b - d && (c > a && a > e || c < a && a < e)) return 2;
        if ((c - e) + (d - f) == 0 && (a - c) + (b - d) == 0 && (c > a && a > e || c < a && a < e)) return 2;
        if (a == e || b == f) return 1;
        if (c - e == d - f || (c - e) + (d - f) == 0) return 1;
        return 2;
    }
}
